package com.iis.hrms.persistence;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigInteger;

/**
 * The persistent class for the history_lembur database table.
 */
@Entity
@Table(name = "history_lembur")
@NamedQueries({
        @NamedQuery(name = "HistoryLembur.findAll", query = "SELECT h FROM HistoryLembur h"),
        @NamedQuery(name = "HistoryLembur.findById", query = "SELECT h FROM HistoryLembur h WHERE h.id = :id"),
        @NamedQuery(name = "HistoryLembur.findByFund", query = "SELECT h FROM HistoryLembur h WHERE h.fund = :fund"),
        @NamedQuery(name = "HistoryLembur.findByApproval", query = "SELECT h FROM HistoryLembur h WHERE h.approval = :approval")})
public class HistoryLembur implements Serializable {
    private static final long serialVersionUID = 1L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(unique = true, nullable = false)
    private String id;

    @Column(nullable = false)
    private byte approval;

    @Column(nullable = false)
    private BigInteger fund;

    // bi-directional many-to-one association to Employee
    @ManyToOne
    @JoinColumn(name = "id_who_approve", nullable = false)
    private Employee employee;

    // bi-directional many-to-one association to HistoryAbsensi
    @ManyToOne
    @JoinColumn(name = "id_history_absensi", nullable = false)
    private HistoryAbsensi historyAbsensi;

    public HistoryLembur() {
    }

    public String getId() {
        return this.id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public byte getApproval() {
        return this.approval;
    }

    public void setApproval(byte approval) {
        this.approval = approval;
    }

    public BigInteger getFund() {
        return this.fund;
    }

    public void setFund(BigInteger fund) {
        this.fund = fund;
    }

    public Employee getEmployee() {
        return this.employee;
    }

    public void setEmployee(Employee employee) {
        this.employee = employee;
    }

    public HistoryAbsensi getHistoryAbsensi() {
        return this.historyAbsensi;
    }

    public void setHistoryAbsensi(HistoryAbsensi historyAbsensi) {
        this.historyAbsensi = historyAbsensi;
    }

}